﻿#pragma strict

function Update () {
	if(gameObject.transform.position.x <= -6){
		var scoreHolder : TotalScore = GameObject.Find("Score").GetComponent(TotalScore);
		scoreHolder.score += 1;
		scoreHolder.guiText.text = "Score: " + scoreHolder.score;
		this.enabled = false;
	}
}